{extend name="base"/}
{block name="content"}
<div class="row">
    <div class="col-xs-9 col-sm-9 col-md-9  col-lg-9">
        <h5>用户列表</h5>
    </div>
	    <div class="col-xs-3 col-sm-3 col-md-3  col-lg-3">
	        <a href="{:url('userAdd')}" class="btn btn-link pull-right">添加用户</a>
	    </div>
</div>
<hr/>
<div class="table-responsive">
    <table class="table table-bordered">
        <thead>
            <tr>
                <th>姓名</th>
                <th>邮箱</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
			{if condition="!empty($list)"}
				{foreach name="list" item='vo'}
		            <tr>
		                <td>{$vo['username']}</td>
		                <td>{$vo['email']}</td>
		                <td>
		                    <a href="{:url('userAdd',['user_id'=>$vo['id']])}">编辑</a>
		                </td>
		            </tr>
				{/foreach}
			{else /}
				<tr> <td colspan="3">暂无用户</td> </tr>
			{/if}
        </tbody>
    </table>
</div>
{/block}